<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::SetIfFieldExists&lt; PointOutT, InT &gt; 模板结构体 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structpcl_1_1_set_if_field_exists.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="structpcl_1_1_set_if_field_exists-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::SetIfFieldExists&lt; PointOutT, InT &gt; 模板结构体 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>A helper functor that can set a specific value in a field if the field exists.  
 <a href="structpcl_1_1_set_if_field_exists.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="point__traits_8h_source.html">point_traits.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a17f84de995f70e779969231c906f335e"><td class="memItemLeft" align="right" valign="top"><a id="a17f84de995f70e779969231c906f335e"></a>
typedef <a class="el" href="structpcl_1_1traits_1_1_p_o_d.html">traits::POD</a>&lt; PointOutT &gt;::type&#160;</td><td class="memItemRight" valign="bottom"><b>Pod</b></td></tr>
<tr class="separator:a17f84de995f70e779969231c906f335e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a1cfc168b4c8715c46a2ca5189dbd78c4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_set_if_field_exists.html#a1cfc168b4c8715c46a2ca5189dbd78c4">SetIfFieldExists</a> (PointOutT &amp;pt, const std::string &amp;field, const InT &amp;value)</td></tr>
<tr class="memdesc:a1cfc168b4c8715c46a2ca5189dbd78c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="structpcl_1_1_set_if_field_exists.html#a1cfc168b4c8715c46a2ca5189dbd78c4">更多...</a><br /></td></tr>
<tr class="separator:a1cfc168b4c8715c46a2ca5189dbd78c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a535dc9055690886165944d920c51590f"><td class="memTemplParams" colspan="2"><a id="a535dc9055690886165944d920c51590f"></a>
template&lt;typename Key &gt; </td></tr>
<tr class="memitem:a535dc9055690886165944d920c51590f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structpcl_1_1_set_if_field_exists.html#a535dc9055690886165944d920c51590f">operator()</a> ()</td></tr>
<tr class="memdesc:a535dc9055690886165944d920c51590f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Operator. Data copy happens here. <br /></td></tr>
<tr class="separator:a535dc9055690886165944d920c51590f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a29c23d1e2f148630b18a1ec54cba4ec9"><td class="memItemLeft" align="right" valign="top"><a id="a29c23d1e2f148630b18a1ec54cba4ec9"></a>
<a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">Pod</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>pt_</b></td></tr>
<tr class="separator:a29c23d1e2f148630b18a1ec54cba4ec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8967e8f1b8c9576fd1ecd9cb3e3bdd57"><td class="memItemLeft" align="right" valign="top"><a id="a8967e8f1b8c9576fd1ecd9cb3e3bdd57"></a>
const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>name_</b></td></tr>
<tr class="separator:a8967e8f1b8c9576fd1ecd9cb3e3bdd57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab183c0d13064324c8b32666801aebc0e"><td class="memItemLeft" align="right" valign="top"><a id="ab183c0d13064324c8b32666801aebc0e"></a>
const InT &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>value_</b></td></tr>
<tr class="separator:ab183c0d13064324c8b32666801aebc0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointOutT, typename InT&gt;<br />
struct pcl::SetIfFieldExists&lt; PointOutT, InT &gt;</h3>

<p>A helper functor that can set a specific value in a field if the field exists. </p>
<dl class="section note"><dt>注解</dt><dd>In order to actually set the value an instance of this functor should be passed to a pcl::for_each_type loop. See the example below.</dd></dl>
<div class="fragment"><div class="line"><a class="code" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> p;</div>
<div class="line"><span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structpcl_1_1traits_1_1field_list.html">pcl::traits::fieldList&lt;PointT&gt;::type</a> FieldList;</div>
<div class="line">pcl::for_each_type&lt;FieldList&gt; (<a class="code" href="structpcl_1_1_set_if_field_exists.html">pcl::SetIfFieldExists&lt;PointT, float&gt;</a> (p, <span class="stringliteral">&quot;intensity&quot;</span>, 42.0f));</div>
<div class="ttc" id="astructpcl_1_1_point_x_y_z_r_g_b_a_html"><div class="ttname"><a href="structpcl_1_1_point_x_y_z_r_g_b_a.html">pcl::PointXYZRGBA</a></div><div class="ttdoc">A point structure representing Euclidean xyz coordinates, and the RGBA color.</div><div class="ttdef"><b>Definition:</b> point_types.hpp:540</div></div>
<div class="ttc" id="astructpcl_1_1_set_if_field_exists_html"><div class="ttname"><a href="structpcl_1_1_set_if_field_exists.html">pcl::SetIfFieldExists</a></div><div class="ttdoc">A helper functor that can set a specific value in a field if the field exists.</div><div class="ttdef"><b>Definition:</b> point_traits.h:292</div></div>
<div class="ttc" id="astructpcl_1_1traits_1_1field_list_html"><div class="ttname"><a href="structpcl_1_1traits_1_1field_list.html">pcl::traits::fieldList</a></div><div class="ttdef"><b>Definition:</b> point_traits.h:177</div></div>
</div><!-- fragment --> </div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a1cfc168b4c8715c46a2ca5189dbd78c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cfc168b4c8715c46a2ca5189dbd78c4">&#9670;&nbsp;</a></span>SetIfFieldExists()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointOutT , typename InT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structpcl_1_1_set_if_field_exists.html">pcl::SetIfFieldExists</a>&lt; PointOutT, InT &gt;::<a class="el" href="structpcl_1_1_set_if_field_exists.html">SetIfFieldExists</a> </td>
          <td>(</td>
          <td class="paramtype">PointOutT &amp;&#160;</td>
          <td class="paramname"><em>pt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const InT &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pt</td><td>the input point </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">field</td><td>the name of the field </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">value</td><td>the value to set </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;      : pt_ (<span class="keyword">reinterpret_cast&lt;</span>Pod&amp;<span class="keyword">&gt;</span>(pt)), name_ (field), value_ (value)</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    {</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该结构体的文档由以下文件生成:<ul>
<li>common/include/pcl/<a class="el" href="point__traits_8h_source.html">point_traits.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="structpcl_1_1_set_if_field_exists.html">SetIfFieldExists</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
